Skip to content

serve: spill prompt states to SSD by default where the family keeps an exact image - #6436

Open
joshuaswarren wants to merge 1 commit into
ashhart:mainfrom
joshuaswarren:w7S/spill-default
Open

joshuaswarren wants to merge 1 commit into
ashhart:mainfrom
joshuaswarren:w7S/spill-default

Conversation

@joshuaswarren

Copy link
Copy Markdown
Contributor

What this changes

Agent serving (tensorfold serve, open and follow alike) turns the on-disk conversation store on without a flag where the resolved family keeps an exact image: spill_default.shape probes the family's own refusals.family with and without the disk flags, so a family that accepts them serves as if --learn-conversations (and --spill-gib, where accepted) were given, and a family that refuses them keeps RAM-only sessions silently. Naming --learn, --learn-conversations, --prompt-cache-disk or --spill-gib keeps the explicit semantics, including each family's refusal. The default stays off under --confidential, --prompt-cache-gib 0, and while TF_KV_SHARE or TF_GLM_REQUEST_STARTS is set; handover and imprint routes still require the explicit flags.

Checks on this head

  • Head commit: 96ec4ca
  • Lean checker, python3 tools/zig/lean_check.py, on the base and on this head: 88 base / 88 head, 0 new
  • Tests run, with the command and pass, fail and skip counts:
    • zig build test-server-cpu test binary, all 4 shards standalone (--tf-shard=N/4): 581+583+583+585 = 2332 passed, 0 failed, 25 skipped (env-pinned). The zig-build wrapper's parallel shard runs die without a named failure on this host — a pre-existing flake; each shard passes standalone.
    • zig build check-native-cuda-host: compiles the real CUDA backend against native.refusals/native.registry.
    • python3 tools/zig/env_names.py: 842 variables, 0 problems.
  • CI: pending on this head.
  • Not run, and why: GPU inference benches — no GPU on this host; the change is flag/default plumbing and the new unit tests cover the shape decision and written flags.

Receipt

  • Main against branch: n/a on this host (no GPU); the change does not touch kernels, lanes or scheduling.
  • New switch? No new switch — the default reuses the existing --learn-conversations/--spill-gib flag semantics and store.
  • Paths and platforms the change reaches, which I ran and which I could not: engines.released feeds open and follow on every backend; exercised through the host test suite (CPU fake engine) and the CUDA-host compile. Metal/CUDA inference paths not run here.
  • Exactness, from tools/bench_concurrent.py --alone --serial or token_sha against "draft": false: n/a — no tokens change; the store's own checks already guarantee read-back equality, and a family whose image is inexact keeps refusing the flags so the default never engages for it.
  • Decode speed before and after: n/a — no hot-path change.
  • Speed claims: n/a.
  • Prompt speed before and after: n/a — flag plumbing only.
  • Licence of any new weights or drafter, or "n/a": n/a

Checklist

  • The title and description match the head commit, including the receipt and the stack.
  • New tests fail before the change, pass after it, and skip cleanly without their dependency. (The functions under test do not exist on base; the file fails to compile there.)
  • Comments and docstrings are one line. No measurements or history in the source.
  • No personal data, machine names, internal hosts or local paths in the diff or its commits.

…n exact image (ashhart#3619)

The resolved family's own refusal surface is the capability check:
spill_default.shape probes refusals.family with and without the disk
flags, so serving engages the conversation store only where the flags
are accepted as named. A family that refuses them keeps RAM-only
sessions silently, while an explicit --learn/--learn-conversations/
--spill-gib keeps its refusal unchanged.

The default stays off under --confidential, --prompt-cache-gib 0, and
the TF_KV_SHARE/TF_GLM_REQUEST_STARTS development variables; handover
and imprint routes still require the explicit flags.

Fixes ashhart#3619

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@joshuaswarren
joshuaswarren marked this pull request as ready for review December 5, 2026 07:27
@ashhart ashhart added kind:feature Classified by Synthena as feature addition synthena:needs-ash Needs owner decision labels Dec 5, 2026
@ashhart

ashhart commented Dec 5, 2026

Copy link
Copy Markdown
Owner

Synthena Initial Review — Needs maintainer review (kind:feature)

Agent serving now turns on the on-disk conversation store by default (as if --learn-conversations, plus --spill-gib where accepted, were given) for families whose own refusals accept those flags, and leaves sessions RAM-only for families that refuse them. Naming any of the disk flags keeps the existing explicit behavior, and the default stays off under --confidential, --prompt-cache-gib 0, TF_KV_SHARE or TF_GLM_REQUEST_STARTS.

  • Synthena

@ashhart

ashhart commented Dec 5, 2026

Copy link
Copy Markdown
Owner

Thanks @joshuaswarren. The saved-image paths copy existing bytes without adding a precision conversion, and the four default opt-outs are present.

We’ll handle the remaining fixes: keep automatic disk failures in RAM with a clear warning, preserve explicitly named disk controls, and keep Qwen’s shared-KV mode serving. We’ll also add a disk guard and its regression test. No further revision is needed from you for those fixes.

Before landing, we still need exact image and token comparisons across eviction and restart, plus cold and reused-request timings to confirm there is no slowdown.

  • Synthena

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind:feature Classified by Synthena as feature addition synthena:needs-ash Needs owner decision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sessions spill to SSD whole and resume without re-prefill, for every family

2 participants